﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;

namespace DataShow.codeDAL
{
    public class UserProcess
    {
        #region 登录
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        public DataTable Login(string username, string password)
        {
            string sql = "select * from account_forecaster where username=@username and password=@password and is_active='True'";
            SqlParameter[] param = new SqlParameter[]
            {
                new SqlParameter("@username",username),
                new SqlParameter("@password",password)
            };
            return new SqlHelper().ExecuteQuery(sql, param, CommandType.Text);
        } 
        #endregion
    }
}